package com.ruoyi.server.encrypt;

import cn.hutool.core.util.RandomUtil;

/**
 * @author OpenACloud
 * @create 2024/6/13 17:05
 */
public class AuthEncryption {


    /**
     *  定制前
     *
     * @param numAuth
     * @return
     */
    public static Byte[] encryption(int numAuth){
        int headAuth = numAuth / RandomUtil.randomInt(3, 6);
        int tailAuth = numAuth - headAuth;
        Byte[] addAuth = new Byte[6];
        addAuth[0] = (byte) headAuth;
        addAuth[1] = (byte) RandomUtil.randomInt(1, 66);
        addAuth[2] = (byte) RandomUtil.randomInt(-24, 32);
        addAuth[3] = (byte) RandomUtil.randomInt(-124, 125);
        addAuth[4] = (byte) RandomUtil.randomInt(-3, -79);
        addAuth[5] = (byte) tailAuth;
        return addAuth;
    }



}
